import { ref } from "vue";
const isOpen = ref(false);
const title = ref("");
const content = ref("");
const link = ref("");
const confirmText = ref("确定");
const cancelText = ref("取消");
export function dialogJs() {
  const diaLogShow = (options = {}) => {
    title.value = options.title || "提示";
    title.value = options.title || "提示";
    content.value = options.content || "";
    link.value = options.link || "";
    confirmText.value = options.confirmText || "确定";
    cancelText.value = options.cancelText || "取消";
    isOpen.value = true;
  };
  const diaLogHide = () => {
    isOpen.value = false;
  };
  return {
    isOpen,
    title,
    content,
    link,
    confirmText,
    cancelText,
    diaLogShow,
    diaLogHide,
  };
}
